package com.example.blog.entity;

import lombok.Data;
import java.util.Date;

@Data
public class Category {

    private Long id;
    private String name;
    private String description;
    private Date createTime;
    private Date updateTime;

    // 可以添加一个方法来初始化默认值
    public void init() {
        if (createTime == null) {
            createTime = new Date();
        }
        updateTime = new Date();
    }

}